<template>
  <div class="app">
    <router-view></router-view>
  </div>
</template>
<script setup>
import {onMounted,onUnmounted} from 'vue'
import { useResizeStore } from '@/store/modules/resize'

  let resizeStore = useResizeStore()
  // 添加事件监听
  const handleResize = (event) => {
      resizeStore.handleDeviceHeightChange(event);
  };
  onMounted(() => {
      window.addEventListener('resize', handleResize);
  });

  onUnmounted(() => {
      window.removeEventListener('resize', handleResize);
  });
</script>
<style scoped lang="scss">
.app{
  position: absolute;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  user-select: none;
  overflow: hidden;
}
</style>